import request from '@/utils/request'

// 获取组织架构数据
export function getDepartments() {
  return request({
    url: '/company/department'
  })
}
/**
 *
 * @returns 获取负责人列表
 */

export function getManagerList() {
  return request({
    url: '/sys/user/simple'
  })
}

/**
 *
 * @param {*} data 新增组织
 * @returns
 */
export function addDepartment(data) {
  return request({
    method: 'post',
    url: '/company/department',
    data
  })
}

/**
 *
 * @param {*} id 获取部门详情
 * @returns
 */

export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
